home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
comm
/
irc
/
KuangEleven3Gm.lha
/
Kuang Eleven 3
/
Rexx
/
Reconnect.amirx
< prev
next >
Wrap
Text File
|
1998-05-09
|
4KB
|
163 lines
/* $VER: Reconnect.amirx 1.4 (9.5.98) AmIRC Reconnect
Part of Kuang Eleven 2.9
Introduction :
AmIRC's internal reconnect is pretty lame in that if the
modem/stack drops it doesnt work.Could have easily been
fixed by using a retry value but I guess nobody's perect.
This script solves this problem.
Features :
· Configurable
· Fully automatic mode or fully configurable mode.
· Joins ALL previously joined channels
· Perfect if your away from the computer
· Has internal list of servers to connect to upon
disconnect or connects to last server.
· Sets you away , if you were away before with an
away message.Also iconifies the client if you
were away.
Installation :
1. Copy to the AmIRC rexx directory.
2. Enter into the Connect Event :
reconnect.amirx
3. Disable the internal AmIRC Auto Reconnect to server
from the "User modes" menu.
4. Set your timeout.This is the time a connect should last.
5. Set your retries.If your ISP is busy frequently then bump this
up.
Advanced topics : using diffrent AmIRC configs
If you are on an IRCnet with some servers that go down for
a while , set up the servers list.Note that reconect will then
connect to those servers only, distrupting your activity on
*other* IRCNets.
This can be solved by making a new AmIRC config for every network.
To do this :
1. Duplicate your reconnect.amirx script to something like :
UndernetReconnect.amirx
2. Edit the duplicate script and put a servers list there.
3. Follow the installation instructions BUT enter into
the connect event the duplicate's file name.
4. Turn on AmIRC's Settings/Create Icons Menu option.
5. Save Settings to a file of your choice.
You may also edit the icon's tooltypes to autoconnect to
your preferred server with Server=.... and CONNECT
tooltypes.
Repeat the above steps for all the networks you're on and
put the icons on your favorite tools launcher.
Well this really doesnt have much to do with reconnect.amirx
but it improves the usability of AmIRC and that is how I use
it.There is no way to make reconnect.amirx servers list work
on multiple networks otherwise.
Programming techniques :
Standard AmIRC AREXX to query information, GETLINE to process
server responses after connection and reset previous status.
History :
1.0 12.2.97 First Release
1.1 Fixed bugs (JOIN)
1.2 Now checks if already connected (manual)
1.3 Now has an internal list of servers to cycle through.
1.4 Added support for away.
***** Config *****
*/
/* Connect timeout in seconds
*/
maxtimeout=60
/* number of retries
*/
retries=5
/* Number of servers keep this to 0 to reconnect to the same server
(Value of 0 will cause to reconnect to previous server)
*/
servers.0=0
/* List of servers to cycle through the number of servers must match
the servers.0 entry
*/
servers.1='Honolulu.HI.US.GalaxyNet.org'
servers.2='destiny.uk.galaxynet.org'
/* Away reason */
awayreason='Not here'
/* Do not mess with code below */
options results
"GETSERVERNAME"
server=result
"CHANNELS"
channels=strip(result)
"GETAWAYSTATE"
away=rc
if servers.0~=0 then do
num=0
do i=1 to servers.0
if upper(servers.i)=upper(server) then num=i
end
num=num+1
if num>servers.0 then num=1
server=servers.num
end
cecho('AmIRC Reconnect 1.4 By Ariel Magnum.Reconnecting to' server 'channels' channels)
do in=1 to retries
"ISCONNECTED"
if rc=0 then do
cecho('Already connected')
exit
end
'SAY /SERVER' server
do maxtimeout
"ISCONNECTED"
if rc=0 then leave
delay(50)
end
"ISCONNECTED"
if rc=5 then do
cecho('Attempt' in 'timed-out')
iterate
end
do until line.command='376'
"GETLINE"
end
if channels~='' then do
channels=translate(channels,',',' ')
'SAY /JOIN' channels
do words(channels)
do until line.command='JOIN'
"GETLINE"
end
end
end
if away=5 then do
/* check for Kuang Eleven - if present - Iconify */
x=getclip('st_init')
if x=2 then 'SAY /AWAY V HIDE' awayreason
else do
'SAY /AWAY' awayreason
"HIDE"
end
end
exit
end
cecho('Unable to reconnect')
exit
cecho:;"ECHO P="d2c(27)"b«Reconnect»" arg(1)'.';return 0